<?php
function PMA_outBufferModeGet() { static $mode = null; if (null !== $mode) { return $mode; } $mode = 0; if ($GLOBALS['cfg']['OBGzip'] && function_exists('ob_start')) { if (ini_get('output_handler') == 'ob_gzhandler') { $mode = 0; } elseif (function_exists('ob_get_level') && ob_get_level() > 0) { $mode = 0; } else { $mode = 1; } } return $mode; } function PMA_outBufferPre() { if ($mode = PMA_outBufferModeGet()) { ob_start('ob_gzhandler'); } header('X-ob_mode: ' . $mode); register_shutdown_function('PMA_outBufferPost'); } function PMA_outBufferPost() { if (ob_get_status() && PMA_outBufferModeGet()) { ob_flush(); } else { flush(); } } ?>
